import os
import argparse

class Args:
    task_name = "bert_pretrain"
    num_gpus = 1
    bert_dir = '../model_torch/'
    load_model = True
    load_path = '../checkpoints/softmaskedbert/model.pkl'
    # load_path = '../checkpoints/data1_softmaskedbert_pre_train_initial/model.pkl'
    do_train = True
    train_data = '../data/data2/train_data.txt'
    do_valid = True
    valid_data = '../data/data2/test_data.txt'
    do_test = False
    test_data = '../data/data2/test_data.txt'
    do_predict = True
    batch_size = 32
    epoch = 10
    learning_rate = 2e-7
    do_save = True
    resume = True
    # save_dir = '../checkpoints'
    save_dir = '../checkpoints/pre_train_initial'
    if not os.path.exists(save_dir):
        os.makedirs(save_dir)
    seed = 123
    max_len = 128


# parser = argparse.ArgumentParser()
# ## Required parameters
# parser.add_argument("--bert_dir", default="../model_torch/", type=str, required=True,)
# parser.add_argument("--train_data", default='../data/data2/train_data.txt', type=str, required=True,)
# parser.add_argument("--valid_data", default='../data/data2/test_data.txt', type=str, required=True,)
# parser.add_argument("--load_path", default='../checkpoints/softmaskedbert/pre_train/initial/model.pkl', type=str, required=False,)
# parser.add_argument("--test_data", default='../data/data2/test_data.txt', type=str, required=True,)
# parser.add_argument("--save_dir", default='../checkpoints/data2_softmaskedbert_pre_train_initial/', type=str, required=True,)
# # parser.add_argument("--test_data", default='../data/data2/test_data.txt', type=str, required=True,)
#
# ## Other parameters
# parser.add_argument("--num_gpus", default=-1, type=int,)
# parser.add_argument("--report_steps", default=-1, type=int,)
# parser.add_argument("--warmup_steps", default=0, type=int,)
# parser.add_argument("--split_num", default=3, type=int,)
# parser.add_argument('--logging_steps', type=int, default=50,)
# parser.add_argument('--save_steps', type=int, default=50,)
# parser.add_argument("--eval_all_checkpoints", action='store_true',)
# parser.add_argument("--no_cuda", action='store_true',)
# parser.add_argument('--overwrite_output_dir', action='store_true',)
# parser.add_argument('--overwrite_cache', action='store_true',)
# parser.add_argument('--seed', type=int, default=42,)
#
# parser.add_argument("--load_model", type=int, default=1,)
# parser.add_argument("--do_train", default=0, type=int, required=False,)
# parser.add_argument("--do_test", default=0, type=int, required=False,)
# parser.add_argument("--do_valid", default=0, type=int, required=False,)
# parser.add_argument("--do_predict", default=0, type=int, required=False,)
# parser.add_argument("--not_do_eval_steps", default=0.35, type=float,)
# args = parser.parse_args()